load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
load("//bazel:tachyon_cc.bzl", "tachyon_cc_library", "tachyon_cc_unittest")
load(
    "//tachyon/math/finite_fields/generator/prime_field_generator:build_defs.bzl",
    "SMALL_SUBGROUP_ADICITY",
    "SMALL_SUBGROUP_BASE",
    "SUBGROUP_GENERATOR",
)

package(default_visibility = ["//visibility:public"])

string_flag(
    name = SMALL_SUBGROUP_ADICITY,
    build_setting_default = "1",
)

string_flag(
    name = SMALL_SUBGROUP_BASE,
    build_setting_default = "3",
)

string_flag(
    name = SUBGROUP_GENERATOR,
    build_setting_default = "7",
)

tachyon_cc_library(
    name = "goldilocks",
    hdrs = ["goldilocks.h"],
    deps = [
        "//tachyon/math/finite_fields/goldilocks/internal:goldilocks",
        "//tachyon/math/finite_fields/goldilocks/internal:goldilocks_prime_field_x86_special",
    ],
)

tachyon_cc_unittest(
    name = "goldilocks_unittests",
    srcs = ["goldilocks_unittest.cc"],
    deps = [":goldilocks"],
)
